package org.webscale.util.sqs;
import org.apache.log4j.Logger;

import test.WebScaleTestCase;

public class TestSQSStuff extends WebScaleTestCase {
	private static final Logger log = Logger.getLogger(TestSQSStuff.class);
static int i= 0;
	public void testSQS() throws Exception {
		SQSListenerService s = (SQSListenerService)super.lookUp("sqsListenerService");
		SQSHelper helper = (SQSHelper) super.lookUp("sqsHelper");
	
		helper.putMessage("Some message number " + i++);
		helper.putMessage("Some message number " + i++);
		helper.putMessage("Some message number " + i++);
		helper.putMessage("Some message number " + i++);
		helper.putMessage("Some message number " + i++);
		log.info("Sleeing for 2 sec");
	//	Thread.currentThread().sleep(2000);
		
		log.info("starting the listener");
		SQSListenerTimer.startListener();
		
		Thread.currentThread().sleep(1050000);
	}
	
}
